package descriptors;

import java.util.Map;
import java.util.Map.Entry;

public class RecordDescr extends AbstractDescr{
	
	
	Map<String,AbstractDescr> recSymbolTable;
	
	public RecordDescr(int fs, Map<String,AbstractDescr> fr){
		this.size=fs;
		this.recSymbolTable=fr;
	}
	public Map<String, AbstractDescr> recSymbolTable() {
		return recSymbolTable;
	}
	@Override
	public void print() {
		trace("RecordDescr: size: " + size + " level: " + level);
		
		for(Entry<String, AbstractDescr> entry: recSymbolTable.entrySet()){
			System.out.print(AbstractDescr.getSpaces() + entry.getKey() + ": "); entry.getValue().print();
		}
		unindent();
	}

}
